home *** CD-ROM | disk | FTP | other *** search
/ PCGUIA 2010 Software/Programs / PCGuia_programas.iso / Software / Internet / FeedDemon / FeedDemonInstall.exe / {app} / Data / Styles / Prince.fdxsl2 < prev    next >
Encoding:
Extensible Markup Language  |  2009-09-09  |  8.7 KB  |  231 lines

  1. <?xml version="1.0"?>
  2.  
  3. <xsl:stylesheet version="1.0"
  4.     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  5.     xmlns:fd="http://www.bradsoft.com/feeddemon/xmlns/1.0/">
  6.  
  7. <xsl:output method="html"
  8.     doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
  9.     doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
  10.  
  11. $INCLUDE(commonvar.inc)$
  12.  
  13. <fd:capabilities showExcerpts="false" toggleExcerpts="false" collapsePosts="false" itemGrouping="false" />
  14.  
  15. <xsl:variable name="feed-type" select="newspaper/channel/@feedType"/>
  16.  
  17. <xsl:variable name="img_link_new" select="'$IMAGEDIR$linknew.gif'"/>
  18. <xsl:variable name="img_flag_on" select="'$IMAGEDIR$star-on.png'"/>
  19. <xsl:variable name="img_flag_off" select="'$IMAGEDIR$star-off.png'"/>
  20. <xsl:variable name="img_enclosure" select="'$IMAGEDIR$enclosure.gif'"/>
  21. <xsl:variable name="img_permalink" select="'$IMAGEDIR$link.gif'"/>
  22. <xsl:variable name="img_newsbin" select="'$IMAGEDIR$newsbin.gif'"/>
  23.  
  24. <xsl:variable name="lang_hdr_total" select="'$LANG_CONST(S_NewsHdrTotal)$'"/>
  25. <xsl:variable name="lang_hint_open_new" select="'$LANG_CONST(S_NewsHintOpenInNewTab)$'"/>
  26. <xsl:variable name="lang_hint_toggle_flag" select="'$LANG_CONST(S_NewsHintToggleFlag)$'"/>
  27. <xsl:variable name="lang_hint_addtonewsbin" select="'$LANG_CONST(S_NewsHintAddToNewsBin)$'"/>
  28.  
  29. <xsl:variable name="common-head">
  30.     $INCLUDE(metatrans.inc)$
  31.     <style type="text/css">
  32.         /*html { border: 1px solid purple; }*/
  33.         $INCLUDE(commonstyles.css)$
  34.         
  35.         body {
  36.             font-size: $FONT-SIZE-NEWSPAPER$;
  37.             line-height: 1.6em;
  38.             font-family: "$FONT-NAME-NEWSPAPER$", Verdana, Arial, sans-serif;
  39.             margin: 0;
  40.             margin-bottom: 12px;
  41.             color: black;
  42.             background-color: white;
  43.         }
  44.         a { color: purple; }
  45.         a:hover { color: #CB00CC; }
  46.         a.notcached {
  47.             text-decoration: none ! important;
  48.             border-bottom: 1px dotted red ! important;
  49.         }
  50.         .postactions {
  51.             display: inline;
  52.             margin-left: 8px;
  53.         }
  54.         .sep { color: silver; margin: 0 2px; font-size: 10px; vertical-align: middle }
  55.         .none { color: #A9A9A9; }
  56.         img.icon { border: none; margin-left: 3px;}
  57.         div#noitems { color: #9099AE; }
  58.         #fdfocusedpost { background-color: #FFE1FF; }
  59.         a.share, span.taglist {    font-size: 11px; vertical-align: middle; }
  60.         .taglist a { color: green; text-decoration: none; }
  61.         a.share { color: gray; text-decoration: none; }
  62.     </style>
  63. </xsl:variable>
  64.  
  65. <!-- folder or channel newspaper -->
  66. <xsl:template match="newspaper[@type='folder' or @type='channel' or @type='search' or @type='newsitemarray']">
  67. <html>
  68. <head>
  69.     <title>Newspaper (<xsl:value-of select="title" disable-output-escaping="yes"/>)</title>
  70.     <xsl:copy-of select="$common-head"/>
  71.     <style type="text/css">
  72.         div#newspapertitle {
  73.             color: white;
  74.             background-color: #8B008B;
  75.             border-bottom: 1px solid #8B008B;
  76.             font-weight: bold;
  77.             height: 24px;
  78.             filter: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#FFCCFF,endColorStr=#8B008B);            
  79.             margin-bottom: 15px;
  80.             padding: 4px 8px;
  81.         }            
  82.         div#container { margin: 6px 18px; }
  83.         div.channeltitle { font-weight: bold; color: #003300; margin-top: 12px; }
  84.         div.channeltitle a { color: #003300; text-decoration: none; }
  85.         div.channeltitle a:hover { text-decoration: underline; }
  86.         ul { margin-top: 6px; margin-bottom: 15px; }
  87.         ul li { margin-bottom: 3px; }
  88.         a.flagged { color: $COLOR-FLAGGED$; }
  89.     </style>    
  90. </head>
  91.  
  92. <body>
  93.     <xsl:variable name="folderId" select="@folderId"/>
  94.     
  95.     <div id="newspapertitle">
  96.         <xsl:value-of select="title" disable-output-escaping="yes"/>
  97.     </div>
  98.     
  99.     <div id="container">
  100.         <xsl:if test="$item-count=0"><div id="noitems">$LANG_CONST(S_NoItemsInNewspaperFilter)$</div></xsl:if>    
  101.         <xsl:for-each select="channel">
  102.             <xsl:sort select="title"/>
  103.             <xsl:variable name="chanlink" select="link"/>
  104.             <xsl:variable name="feedId" select="@feedId"/>
  105.             <xsl:if test="$newspaper-type='folder'">
  106.                 <div class="channeltitle">
  107.                     <a href="fdaction:?action=gotofeed&feedid={$feedId}" title="$LANG_CONST(S_NewsHintGotoFeed)$"><xsl:value-of select="title" disable-output-escaping="yes"/></a>
  108.                     <a href="fdaction:?action=gotofeedlink&newtab=1&feedid={$feedId}" title="{$lang_hint_open_new}">
  109.                         <img src="{$img_link_new}" class="icon" align="absmiddle" />
  110.                     </a>                    
  111.                 </div>
  112.             </xsl:if>
  113.             <ul>
  114.                 <xsl:for-each select="item">
  115.                     <xsl:sort select="@sortIndex" data-type="number"/>
  116.                     <xsl:variable name="postId" select="@postId"/>
  117.                     <xsl:variable name="itemlink" select="link"/>
  118.                     <li>
  119.                         <xsl:apply-templates select="."/>
  120.                     </li>
  121.                 </xsl:for-each>
  122.             </ul>
  123.         </xsl:for-each>
  124.     </div>
  125. </body>
  126. </html>
  127. </xsl:template>
  128.  
  129. <!-- single news item newspaper -->
  130. <xsl:template match="newspaper">
  131.     <html>
  132.     <head>
  133.         <title>Newspaper</title>
  134.         <xsl:copy-of select="$common-head"/>
  135.         <style type="text/css">
  136.             div.newsitemheader {
  137.                 color: white;
  138.                 background-color: #8B008B;
  139.                 border-bottom: 1px solid #8B008B;
  140.                 font-weight: bold;
  141.                 height: 100%;
  142.                 filter: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#FFCCFF,endColorStr=#8B008B);
  143.             }        
  144.             div.newsitemheader, table.newsiteminfo td, div.newsitemcontent { 
  145.                 padding: 6px 18px;
  146.             }
  147.             table.newsiteminfo { 
  148.                 border-bottom: 1px solid #B2B2B2;
  149.                 background-color: #EFEFEF;
  150.                 width: 100%;
  151.                 margin-bottom: 8px;
  152.                 filter: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#EFEFEF,endColorStr=#D8D8D8);
  153.             }
  154.             div.newsitemheader a, table.newsiteminfo a { text-decoration: none; }
  155.             div.newsitemheader a:hover, table.newsiteminfo a:hover { text-decoration: underline; }
  156.             div.newsitemheader a, div.newsitemheader a:hover { color: white; }
  157.             div.newsitemcontent { background-color: #fff;  }
  158.             div.newsitemcontent img { margin: 2px 4px; padding: 2px; border: 1px solid purple; }
  159.             div.newsitemcontent code, div.newsitemcontent kbd, div.newsitemcontent pre { font-size: 100%;}
  160.             div.newsitemcontent blockquote { border: 1px solid #FFCCFF; border-left-width: 6px; padding: 10px 16px; background-color: #FFF4FF}
  161.             div.newsitemcontent blockquote blockquote { background-color: white; border-width: 1px;  }
  162.             div.newsitemcontent p { margin-top: 0; }
  163.         </style>        
  164.     </head>
  165.     <body>
  166.         <xsl:apply-templates select="channel/item"/>
  167.     </body>
  168.     </html>
  169. </xsl:template>
  170.  
  171. <!-- news item template -->
  172. <xsl:template match="item">
  173.     <xsl:variable name="feedId" select="@feedId"/>
  174.     <xsl:variable name="postId" select="@postId"/>    
  175.     <xsl:variable name="itemlink" select="link"/>
  176.     <xsl:variable name="itemclass">
  177.         <xsl:choose>
  178.             <xsl:when test="state/@flagged!=0">flagged</xsl:when>
  179.             <xsl:otherwise>normal</xsl:otherwise>
  180.         </xsl:choose>
  181.     </xsl:variable>
  182.     <div class="fdnewsitem" name="{$feedId}:{$postId}">
  183.         <div class="newsitemheader">    
  184.             <!-- use actual link for single item newspaper, otherwise link to single item newspaper -->
  185.             <xsl:choose>
  186.                 <xsl:when test="$newspaper-type='newsitem'">
  187.                     <a id="{$postId}_title" class="{$itemclass}" href="{$itemlink}"><xsl:value-of select="title" disable-output-escaping="yes"/></a>
  188.                 </xsl:when>
  189.                 <xsl:otherwise>
  190.                     <a id="{$postId}_title" class="{$itemclass}" href="fdaction:?action=gotopost&feedid={$feedId}&postid={$postId}&markpostread=1" title="$LANG_CONST(S_NewsHintGotoPost)$"><xsl:value-of select="title" disable-output-escaping="yes"/></a>
  191.                     $INCLUDE(postactions.inc)$
  192.                 </xsl:otherwise>
  193.             </xsl:choose>        
  194.         </div>
  195.         
  196.         <!-- show content only for single item newspaper -->
  197.         <xsl:if test="$newspaper-type='newsitem'">
  198.             <table class="newsiteminfo" cellpadding="0" cellspacing="0">
  199.             <tr>
  200.                 <td>
  201.                     <strong>Date: </strong><xsl:value-of select="dateDisplay"/>
  202.                     <br/>
  203.                     <xsl:if test="author">
  204.                         <strong>By: </strong><xsl:value-of select="author"/>
  205.                         <br/>
  206.                     </xsl:if>
  207.                     <xsl:if test="link">
  208.                         <strong>Link: </strong><a href="fdaction:?action=gotopostlink&newtab=0&feedid={$feedId}&postid={$postId}&markpostread=1"><xsl:value-of select="link"/></a>
  209.                     </xsl:if>
  210.                     $INCLUDE(postactions.inc)$
  211.                 </td>
  212.                 <td align="right" valign="bottom">            
  213.                     <xsl:if test="enclosure">                    
  214.                         <xsl:variable name="enclosurelink" select="enclosure/@url"/>
  215.                         <xsl:variable name="enclosuretype" select="enclosure/@type"/>
  216.                         <a href="fdaction:?action=downloadenclosure&feedid={$feedId}&postid={$postId}&url={$enclosurelink}" title="{$enclosuretype}"><img src="{$img_enclosure}" border="0" align="absmiddle" /> Enclosure</a>
  217.                     </xsl:if>                
  218.                 </td>
  219.             </tr>
  220.             </table>
  221.         
  222.             <xsl:if test="description">        
  223.                 <div class="newsitemcontent">
  224.                     <xsl:value-of select="description" disable-output-escaping="yes"/>
  225.                 </div>
  226.             </xsl:if>
  227.         </xsl:if>
  228.     </div>
  229. </xsl:template>
  230.  
  231. </xsl:stylesheet>